﻿using System;
using System.Data.Entity.ModelConfiguration.Configuration;
using ENail.Domain.Core;
using Equation.Enterprise.Framework.Domain.Model;

namespace ENail.Domain.Data.Mapping
{
    public class VendorMapping:EntityMappingWithTypedId<Vendor, Int16>
    {
        public VendorMapping() : base("Vendor")
        {
            Property(x => x.Id).HasColumnName("VendorId");
            HasRequired(x => x.NailSalon).WithMany(x => x.Vendors).Map(x => x.MapKey("NailSalonId"));
        }
    }
}
